react conditional classname

95

react add class conditionally -

<div className={`btn-group pull-right ${this.props.showBulkActions ? 'shown' : 'hidden'}`}>

react conditional class -

<div className={"btn-group pull-right " + (this.props.showBulkActions ? 'show' : 'hidden')}>

react conditional classname -

<div className={removeTitle ? 'without-title' : null}>

Comments

Submit
0 Comments